<template>
    <div v-if="orderInfo.address">
        订单页面
        <router-link tag="div" to="/cart/order/address">
            地址名称:{{ orderInfo.address.name }}
        </router-link>
        <ul>
            <li v-for="item in orderInfo.goodsList" :key="item.id">
                <p>{{ item.goods_name }}</p>
                <p>{{ item.retail_price }}</p>
            </li>
        </ul>
    </div>
</template>

<script>
import {
    detailAction
} from "@/api/cart/order/inde"
export default {
    data() {
        return {
            orderInfo:{}
        };
    },
    computed: {

    },
    created() {
        detailAction({
            openId:localStorage.getItem("openId"),
            addressId:""
        })
        .then(res =>{
            console.log(res)
            var address = localStorage.getItem("addressInfo");
            if(address){
                res.address =JSON.parse(address) 
            }
            this.orderInfo = res;
            
        })
    },
    mounted() {

    },
    methods: {

    },
};
</script>

<style scoped lang="scss">

</style>
